package com.syn.synold4s.adapter;

import android.content.Context;

import com.gaoyi.basemodule.baseAdapter.BasePagerAdapter;
import com.gaoyi.basemodule.baseUtil.ImageUtil;
import com.syn.synold4s.R;
import com.syn.synold4s.databinding.ItemImagePreviewBinding;

import java.util.List;

public class ImagePreviewAdapter extends BasePagerAdapter<String, ItemImagePreviewBinding> {

    public ImagePreviewAdapter(Context context, List<String> list) {
        super(context, list);
    }

    @Override
    protected void setBindingVariable(ItemImagePreviewBinding binding, int position) {
    }

    @Override
    public void onBindItem(ItemImagePreviewBinding binding, String bean, int position) {
        ImageUtil.loadImg(binding.ivPhoto, bean, R.drawable.error_img);
    }

    @Override
    protected int getLayoutResId() {
        return R.layout.item_image_preview;
    }
}
